import type { RouteRecordRaw } from 'vue-router';

// 扩展路由元信息类型
export interface ExtendedMeta {
  title?: string;
  icon?: string;
  iconShow?: boolean;
  affix?: boolean;
  breadcrumb?: boolean;
  activeMenu?: string;
  watermark?: boolean;
  roles?: string[];
  role?: string[];
  keepAlive?: boolean;
  [key: string]: any;
}

// 扩展路由类型
export interface ExtendedRoute extends Omit<RouteRecordRaw, 'meta' | 'children'> {
  hidden?: boolean;
  meta?: ExtendedMeta;
  children?: ExtendedRoute[];
}

// 路由类型别名
export type AppRoute = RouteRecordRaw & ExtendedRoute;
